package com.magnificent.atlantis.common;

import com.magnificent.atlantis.common.entity.ServerMeeting;
import com.magnificent.atlantis.common.entity.ServerUser;
import com.magnificent.atlantis.common.entity.messages.ServerMessage;
import com.magnificent.atlantis.common.message.Response;
import com.magnificent.commons.db.datasource.ObjectEntity;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

/**
 * User: Babanin
 * Date: 26.03.2009
 * Time: 12:20:55
 */
public interface Connector extends Remote {
    public static final String NAME = "AtlantisConnector";

    // User
    Response login(String login, String password) throws RemoteException;

    // Messages
    public List<ServerMessage> getMessages(int userId) throws RemoteException;
    public ObjectEntity postMessage(ServerMessage serverMessage) throws RemoteException;

    // Meetings
    public ServerMeeting getMeeting(int meetingId) throws RemoteException;
    public List<ServerMeeting> getMeetings(List<Integer> meetingIds) throws RemoteException;

    // Common
    public List<ServerUser> getUserList() throws RemoteException;
}
